<template>
	<view>
		<u-popup v-model="show" mode="center"
		:closeable="true" close-icon="close-circle" border-radius="16"
		close-icon-size="50" close-icon-color="#333" @click="close" @close="close">
			<view class="pop">
				<image :src="icon" mode="widthFix"></image>
				<view class="title">
					{{title}}
				</view>
				<view class="text">
					{{desc}}
				</view>
				<view class="n-btn-primary" @click="confirm">
					确定
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	// 父级使用 this.$refs.popupShow.show = true 控制显示隐藏
	export default {
		name:"n-popup",
		data() {
			return {
				show:false
			};
		},
		props:{
			// show:{
			// 	type:Boolean,
			// 	default:false
			// },
			icon:{
				type:String,
				default:'https://longzhiyue-1255795789.cos.ap-shanghai.myqcloud.com/uploads/20221008/307e77d040a55ad2cb128fc1d9cd2a06.png'
			},
			title:{
				type:String,
				default:'提交成功'
			},
			desc:{
				type:String,
				default:'请耐心等待后台审核'
			}
		},
		methods:{
			confirm(){
				console.log('confirm')
				this.$emit('confirm')
			},
			close(){
				this.$emit('close')
			}
		}
	}
</script>

<style lang="scss">
.pop{
		width: 580upx;
		// height: 680upx;
		background: linear-gradient(180deg, #EEFFF6 0%, #FFFFFF 100%);
		box-shadow: 0px 6upx 12upx rgba(153, 153, 153, 0.8);
		text-align: center;
		padding-bottom: 60upx;
		image{
			width: 364upx;
			margin: 92upx auto 0;
		}
		.text{
			font-size: 24upx;
			font-weight: 400;
			color: #999999;
			margin-top: 10upx;
		}
		.title{
			font-size: 34upx;
			font-weight: bold;
			color: #333333;
		}
		.n-btn-primary{
			margin-top: 74upx;
		}
	}
</style>